﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

#region Using

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using NetBay.Core.Extensions;
#endregion

namespace NetBay.Core.BusinessEntities
{
    [DataContract]
    public class ReturnDictionary : ReturnObject
    {
        private Dictionary<string, string> m_oDictionary = new Dictionary<string, string>();
        [DataMember]
        public Dictionary<string, string> Dictionary
        {
            get { return m_oDictionary; }
            set { m_oDictionary = value; }
        }

        public ReturnDictionary()
        {
        }
        public ReturnDictionary(Dictionary<string, string> p_oDictionary)
        {
            Dictionary = p_oDictionary;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Folder"/> class for error usages
        /// </summary>
        /// <param name="errorMessage">The error message.</param>
        /// <param name="applicationException">The application exception.</param>
        public ReturnDictionary(string errorMessage, Exception applicationException = null)
            : base(errorMessage, applicationException)
        {
        }


        #region ToString
        /// <summary>
        /// Extend default description of class
        /// </summary>
        /// <returns>description of instance</returns>
        public override string ToString()
        {
            StringBuilder parameters = new StringBuilder("Key<", 1024*32);
            parameters.Append(Key); parameters.Append("> ");
            parameters.Append("Dictionary<"); parameters.Append(Dictionary.ToString(";")); parameters.Append("> ");

            return parameters.ToString();
        }
        #endregion
    }
}
